<template>
  <div class="loginPage">

    <div class="welcome">
        <div class="info">
          <achievement v-if="data.tabId == '1'" :params="data.params" out="0"></achievement>
          <talent v-if="data.tabId == '2'" :params="data.params" out="0"></talent>
          <group v-if="data.tabId == '3'" :params="data.params" out="0"></group>
          <expertsManager v-if="data.tabId == '4'" :params="data.params" out="0"></expertsManager>
          <talentsManager v-if="data.tabId == '5'" :params="data.params" out="0"></talentsManager>
          <budget v-if="data.tabId == '17'" :params="data.params" out="0"></budget>
          <project v-if="data.tabId == '18'" :params="data.params" :out=0></project>
          <contract v-if="data.tabId == '19'" :params="data.params" :out=0></contract>
          <plan v-if="data.tabId == '9'" :params="data.params" :out=0></plan>
          <process v-if="data.tabId == '8'" :params="data.params" :out=0></process>
        </div>

    </div>
  </div>
</template>

<script setup lang="ts">
import { reactive } from 'vue';
import { useRoute } from "vue-router";
import achievement from './achievement/index.vue';
import budget from './budget/construction/digital/index.vue';
import expertsManager from './expertsManager/index.vue';
import group from './group/index.vue';
import talent from './talent/index.vue';
import talentsManager from './talentsManager/index.vue';
import project from './project/index.vue';
import contract from './contract/index.vue';
import plan from './plan/index.vue';
import process from './progress/index.vue';


import { tips } from "@/views/science/components/tips/tips";

const route = useRoute()

// 业务类型
const data = reactive({
  tabId: '0',
  params: {
    businessKey: '',
    businessType: '',
    random: (new Date()).valueOf()
  }
})





if (route.query.businessType) {

  if (route.query.businessType == 'YW01') {
    data.tabId = '1'
  } else if (route.query.businessType == 'YW02') {
    data.tabId = '2'
  } else if (route.query.businessType == 'YW03') {
    data.tabId = '3'
  }
  else if (route.query.businessType == 'YW04') {
    data.tabId = '4'
  }
  else if (route.query.businessType == 'YW05') {
    data.tabId = '5'
  }
  else if (route.query.businessType == 'YW17') {
    data.tabId = '17'
  }
  else if (route.query.businessType == 'YW18') {
    data.tabId = '18'
  }
  else if (route.query.businessType == 'YW19') {
    data.tabId = '19'
  }
  else if (route.query.businessType == 'YW07') {
    data.tabId = '9'
  }
  else if (route.query.businessType == 'YW08') {
    data.tabId = '8'
  }
  data.params.businessKey = route.query.businessKey
  data.params.businessType = route.query.businessType

} else {

  tips("当前业务类型不存在", "warning");

}

</script>
<style scoped lang="scss">
.info {
  height: 60vh;
}

.loginPage {
  padding: 20px;
  display: flex;
  height: 100vh;

  .welcome {
    height: 100%;
    width: 100%;
    box-sizing: border-box;
  }
}
</style>
